﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace csharp_benchmark
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            DateTime time_before = DateTime.Now;
            int c = 0;
            for(int i=0;i<10000000;i++)
            {
                int next = 0;
                int first = 1;
                int second = 2;
                for(c=0;c<40;c++)
                {
                    next = first + second;
                    first = second;
                    second = next;

                }
                c = next;
            }
           

            TimeSpan total_time = DateTime.Now - time_before;
            MessageBox.Show(c.ToString());
            MessageBox.Show("Time taken: "+total_time.Seconds.ToString()+" seconds");
        }
    }
}
